<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateSpeakerTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateSpeakerLabel_speakerID}" for="speakerID" />
                    <h:inputText id="speakerID" value="#{speakerController.selected.speakerID}" title="#{bundle.CreateSpeakerTitle_speakerID}" required="true" requiredMessage="#{bundle.CreateSpeakerRequiredMessage_speakerID}"/>
                    <h:outputLabel value="#{bundle.CreateSpeakerLabel_jobTitle}" for="jobTitle" />
                    <h:inputText id="jobTitle" value="#{speakerController.selected.jobTitle}" title="#{bundle.CreateSpeakerTitle_jobTitle}" />
                    <h:outputLabel value="#{bundle.CreateSpeakerLabel_majorSubject}" for="majorSubject" />
                    <h:inputText id="majorSubject" value="#{speakerController.selected.majorSubject}" title="#{bundle.CreateSpeakerTitle_majorSubject}" />
                    <h:outputLabel value="#{bundle.CreateSpeakerLabel_college}" for="college" />
                    <h:inputText id="college" value="#{speakerController.selected.college}" title="#{bundle.CreateSpeakerTitle_college}" />
                    <h:outputLabel value="#{bundle.CreateSpeakerLabel_biographicalInfo}" for="biographicalInfo" />
                    <h:inputTextarea rows="4" cols="30" id="biographicalInfo" value="#{speakerController.selected.biographicalInfo}" title="#{bundle.CreateSpeakerTitle_biographicalInfo}" />
                    <h:outputLabel value="#{bundle.CreateSpeakerLabel_description}" for="description" />
                    <h:inputTextarea rows="4" cols="30" id="description" value="#{speakerController.selected.description}" title="#{bundle.CreateSpeakerTitle_description}" />
                    <h:outputLabel value="#{bundle.CreateSpeakerLabel_person}" for="person" />
                    <h:selectOneMenu id="person" value="#{speakerController.selected.person}" title="#{bundle.CreateSpeakerTitle_person}" required="true" requiredMessage="#{bundle.CreateSpeakerRequiredMessage_person}">
                        <f:selectItems value="#{personController.itemsAvailableSelectOne}"/>
                    </h:selectOneMenu>
                </h:panelGrid>
                <br />
                <h:commandLink action="#{speakerController.create}" value="#{bundle.CreateSpeakerSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{speakerController.prepareList}" value="#{bundle.CreateSpeakerShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateSpeakerIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
